<me:UIMCT x:Class="WPFExcelReport.TPLCTCP"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"   
                    xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
                    xmlns:me="clr-namespace:WPFExcelReport"  
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"    
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"  
                    x:Name="TV"
                    Background="White"    
                    Loaded="Window_Loaded"
     >
    <me:UIMCT.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIMCT.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0">
            <WrapPanel>
                <TextBlock Text="{Binding Source={Localization:Translate Word=本地}}"/>
                <TextBox Name="txtIP" Text="192.168.31.119"/>
                <TextBox Name="txtPort" Text="25003"/>
               
                <Button Margin="10,10,0,0" Content="{Binding Source={Localization:Translate Word=开始监听}}" Click="btnStartListen_Click"/>
                <Button Margin="10,10,0,0" Content="{Binding Source={Localization:Translate Word=关闭监听}}" Click="btnStopListen_Click"/> 
            </WrapPanel>
            <WrapPanel>
                <TextBlock Text="{Binding Source={Localization:Translate Word=服务器}}"/>
                <Button Content="{Binding ZLANSVRSTATUS,ElementName=TV}" Click="ServerStatusChk" Width="100"/>
                <Button Margin="10,10,0,0" Content="{Binding Source={Localization:Translate Word=启动监听}}" Click="ServerStart"/>
                <Button Margin="10,10,0,0" Content="{Binding Source={Localization:Translate Word=重置}}" Click="ServerReset"/>
                <Button Margin="10,10,0,0" Content="{Binding Source={Localization:Translate Word=写入}}" Click="ServerWrite"/>
                <Button Margin="10,10,0,0" Content="{Binding Source={Localization:Translate Word=读取}}" Click="ServerRead"/>
                <Button Margin="10,10,0,0" Content="{Binding Source={Localization:Translate Word=停止读取}}" Click="ServerStopRead"/>
                <Button Margin="10,10,0,0" Content="{Binding Source={Localization:Translate Word=所有客户端读取}}" Click="ClientsAllReading"/>
                <ex:NumericBox Text="{Binding TIMES,ElementName=TV}"/>
            </WrapPanel>
            <me:TSZL02 
                    IsAuto="True"
                    ORDERNUM="{Binding PLCIP,ElementName=TV}"
                    PLCIP="{Binding EXAUF,ElementName=TV}"
                    ZP0="{Binding ZP0,ElementName=TV}"
                    ZP1="{Binding ZP1,ElementName=TV}"
                    ZP2="{Binding ZP2,ElementName=TV}"
                    ZP3="{Binding ZP3,ElementName=TV}"
                    ZP4="{Binding ZP4,ElementName=TV}"
                    ZP5="{Binding ZP5,ElementName=TV}"
                    ZP6="{Binding ZP6,ElementName=TV}"
                    ZP7="{Binding ZP7,ElementName=TV}"
                    ZP8="{Binding ZP8,ElementName=TV}"
                    ZP9="{Binding ZP9,ElementName=TV}"
                    ZP10="{Binding ZP10,ElementName=TV}"
                    DATASEND="{Binding DATASEND,ElementName=TV}"
                
                />
             
        </StackPanel> 
        <Grid Grid.Row="2">
            <TextBox Text="{Binding INFO}"/> 
        </Grid>
    </Grid>
</me:UIMCT>
